import Vue from 'vue'
import Router from 'vue-router'
import login from '../components/admin/login'
import index from '../components/admin/index'
import userList from '../components/admin/userList'
import welcome from '../components/admin/welcome'
import studentList from "../components/admin/studentList";
import teacherList from "../components/admin/teacherList"
import courseList from "../components/admin/courseList";
import selectionList from "../components/admin/selectionList";
import gradeList from "../components/admin/gradeList";
import stuIndex from "../components/student/stuIndex";
import teaIndex from "../components/teacher/teaIndex";
import stuWelcome from "../components/student/stuWelcome";
import teaWelcome from "../components/teacher/teaWelcome";
import insertStudent from "../components/admin/insertStudent";
import insertTeacher from "../components/admin/insertTeacher";
import teaInsertStudent from "../components/teacher/teaInsertStudent";
import teaStudentList from  "../components/teacher/teaStudentList";
import selCourse from "../components/student/selCourse";
import stuSelectionList from "../components/student/stuSelectionList";
import stuGrade from "../components/student/stuGrade";
import insertGrade from "../components/teacher/insertGrade";
import stuGradeList from "../components/teacher/stuGradeList";
import insertWeight from "../components/teacher/insertWeight";
import weightList from "../components/teacher/weightList";
import insertWeightPoint from "../components/teacher/insertWeightPoint";
import motiveList from "../components/teacher/motiveList";
import stuSeleList from "../components/teacher/stuSeleList";
import stuMotiveList from "../components/student/stuMotiveList";
import stuMotive from "../components/admin/stuMotive";
import englishList from "../components/student/englishList";
import love from "../components/article/love";
import goodMood from "../components/article/goodMood";
import counsel from "../components/article/counsel";
import desiredLife from "../components/article/desiredLife";
import dream from "../components/article/dream";
import friend from "../components/article/friend";
import frog1 from "../components/article/frog1";
import frog2 from "../components/article/frog2";
import girl1 from "../components/article/girl1";
import girl2 from "../components/article/girl2";
import girl3 from "../components/article/girl3";
import life from "../components/article/life";
import warningList from "../components/student/warningList";
import warning from "../components/teacher/warning";
Vue.use(Router)

export default new Router({
  routes: [
    //默认的登录组件
    {
      path: '/',
      name: 'login',
      component: login
    },
    // 管理员主页组件
    {
      path: '/index',
      name: 'index',
      component: index,
      redirect:'/welcome',//重定向到首页
      //子组件
      children:[
        {
          path: '/welcome',
          name: 'welcome',
          component: welcome
        },
        {
          path:'/userList',
          name:'userList',
          component:userList
        },
        // 录入学生
        {
          path: '/insertStudent',
          name:'/insertStudent',
          component: insertStudent
        },
        {
          path: '/studentList',
          name:'studentList',
          component: studentList
        },
        {
          path: '/insertTeacher',
          name: 'insertTeacher',
          component: insertTeacher
        },
        {
          path: '/teacherList',
          name:'teacherList',
          component: teacherList
        },
        {
          path: '/courseList',
          name:'courseList',
          component: courseList
        },
        {
          path: '/selectionList',
          name:'selectionList',
          component: selectionList
        },
        {
          path: '/gradeList',
          name:'gradeList',
          component: gradeList
        },
        {
          path: '/stuMotive',
          name: '/stuMotive',
          component: stuMotive
        }
      ]
    },
    // 学生主页组件
    {
      path: '/stuIndex',
      name: 'stuIndex',
      component: stuIndex,
      redirect:'/stuWelcome',//重定向到首页
      children: [
        {
          path: '/stuWelcome',
          name:'stuWelcome',
          component: stuWelcome
        },
        {
          path: '/selCourse',
          name: '/selCourse',
          component: selCourse
        },
        {
          path: '/stuSelectionList',
          name: '/stuSelectionList',
          component: stuSelectionList
        },
        {
          path: '/stuGrade',
          name: '/stuGrade',
          component: stuGrade
        },
        {
          path: '/stuMotiveList',
          name: '/stuMotiveList',
          component: stuMotiveList
        },
        {
          path: '/englishList',
          name: '/englishList',
          component: englishList
        },
        {
          path: '/love',
          name: '/love',
          component: love
        },
        {
          path: '/goodMood',
          name: '/goodMood',
          component: goodMood
        },
        {
          path: 'counsel',
          name: '/counsel',
          component: counsel
        },
        {
          path: '/desiredLife',
          name: '/desiredLife',
          component: desiredLife
        },
        {
          path: '/dream',
          name: '/dream',
          component: dream
        },
        {
          path: '/friend',
          name: '/friend',
          component: friend
        },
        {
          path: '/frog1',
          name: '/frog1',
          component: frog1
        },
        {
          path: '/frog2',
          name: '/frog2',
          component: frog2
        },
        {
          path: '/girl1',
          name: '/girl1',
          component: girl1
        },
        {
          path: '/girl2',
          name: '/girl2',
          component: girl2
        },
        {
          path: '/girl3',
          name: '/girl3',
          component: girl3
        },
        {
          path: '/life',
          name: '/life',
          component: life
        },
        {
          path: '/warningList',
          name: 'warningList',
          component: warningList
        }

      ]
    },
    // 教师主页组件
    {
      path: '/teaIndex',
      name: 'teaIndex',
      component: teaIndex,
      redirect: '/teaWelcome',
      children: [
        {
          path: '/teaWelcome',
          name:'teaWelcome',
          component: teaWelcome
        },
        {
          path: '/teaInsertStudent',
          name: 'teaInsertStudent',
          component: teaInsertStudent
        },
        {
          path: '/teaStudentList',
          name: '/teaStudentList',
          component: teaStudentList
        },
        {
          path: '/insertGrade',
          name: '/insertGrade',
          component: insertGrade
        },
        {
          path: '/stuGradeList',
          name: '/stuGradeList',
          component: stuGradeList
        },
        {
          path: '/insertWeight',
          name: '/insertWeight',
          component: insertWeight
        },
        {
          path: '/weightList',
          name: '/weightList',
          component: weightList
        },
        {
          path: '/insertWeightPoint',
          name: '/insertWeightPoint',
          component: insertWeightPoint
        },
        {
          path: '/motiveList',
          name: '/motiveList',
          component: motiveList
        },
        {
          path: '/stuSeleList',
          name: '/stuSeleList',
          component: stuSeleList
        },
        {
          path: '/warning',
          name: '/warning',
          component: warning
        }
      ]
    }

  ]
})
